/* ========================================
* 
* file:		thread_pool.cpp
* brief:	
* author:	catlovefish
* version:	1.0.0
* date:		2015-03-05 11:51:13
* 
* ========================================*/
#include "thread_pool.h"

ThreadPool::ThreadPool(int nPoolSize, int nQueueSize)
	:pool_size_(nPoolSize),queue_size_(nQueueSize), 
	stop_(false)
{
}

void ThreadPool::start()
{
	for(int i = 0; i < pool_size_; ++i)
	{
		std::thread* worker = new std::thread(std::bind(&ThreadPool::entry, this));
		thread_list_.push_back(worker);
	}
}
